<!DOCTYPE html>
<html>
	<head>
		<title>Module Develop</title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<style type="text/css">
			html, body {
				height: 100%
			}
			body {
				background-color: #fff;
				margin: 0;
			}
			#wrap {
				height: 100%;
				position: relative;
			}
			#header {
				padding-top: 20px;
				background-color: #5082c2;
				height: 44px;
				position: relative;
			}
			#header h1 {
				font-size: 20px;
				height: 44px;
				line-height: 44px;
				margin: 0em;
				color: #fff;
				margin-left: 100px;
				margin-right: 100px;
				text-align: center;
			}
			#main {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-box-pack: center;
			}
			a.button {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-box-pack: center;
				-webkit-box-align: center;
				height: 32px;
				margin: 8px;
				background-color: rgba(240,240,240,1.0);
				border-color: rgba(220,220,220,1.0);
				border-width: 2px;
				border-style: solid;
			}
			a.active {
				background-color: rgba(240,240,240,0.7);
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div id="main">
				<a class="button" tapmode="active" onclick="fnOpenA()">打开A</a>
				<a class="button" tapmode="active" onclick="fnOpenB()">打开B</a>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script>
		apiready = function() {
		};
		function fnOpenA() {
			var pdfReader = api.require('pdfReader');
			pdfReader.open({
				path : 'widget://res/tjdbz.pdf',
				hidden : {
					print : false,
					export : true,
					bookmark : true,
					email : true
				}
			});
		}

		function fnOpenB() {
			var pdfReader = api.require('pdfReader');
			pdfReader.openView({
				rect : {
					x : 0,
					y : 0,
					w : 'auto',
					h : 'auto'
				},
				path : 'http://58.218.39.177:3000/xinyi/files/xinyiAppId/b40e2dae72b64088a6f98fd6311a0b0c_%E5%8C%96%E5%B7%A5%E4%BC%81%E4%B8%9A%E5%B7%A5%E8%89%BA%E5%AE%89%E5%85%A8%E7%AE%A1%E7%90%86%E5%AE%9E%E6%96%BD%E5%AF%BC%E5%88%99%EF%BC%88AQT%203034-2010%20%EF%BC%89.pdf',
				fixedOn : api.frameName,
				fixed : true
			}, function(ret) {
				alert(JSON.stringify(ret));
			});
		}
	</script>
</html>
